/* USER CODE BEGIN Header */
/**
  ******************************************************************************
  * @file           : main.h
  * @brief          : Header for main.c file.
  *                   This file contains the common defines of the application.
  ******************************************************************************
  * @attention
  *
  * <h2><center>&copy; Copyright (c) 2021 STMicroelectronics.
  * All rights reserved.</center></h2>
  *
  * This software component is licensed by ST under Ultimate Liberty license
  * SLA0044, the "License"; You may not use this file except in compliance with
  * the License. You may obtain a copy of the License at:
  *                             www.st.com/SLA0044
  *
  ******************************************************************************
  */
/* USER CODE END Header */

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __MAIN_H
#define __MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "stm32f1xx_hal.h"

/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
#include "stdio.h"
#include "usart.h"
/* USER CODE END Includes */

/* Exported types ------------------------------------------------------------*/
/* USER CODE BEGIN ET */

/* USER CODE END ET */

/* Exported constants --------------------------------------------------------*/
/* USER CODE BEGIN EC */

/* USER CODE END EC */

/* Exported macro ------------------------------------------------------------*/
/* USER CODE BEGIN EM */
#ifdef DEBUG
#define DEBUG_PRINT(format,...)	printf(format,##__VA_ARGS__)
#else
#define DEBUG_PRINT(format,...)
#endif
#define PRINT(s)	HAL_UART_Transmit(&huart1, (s), strlen(s), HAL_MAX_DELAY);
/* USER CODE END EM */

/* Exported functions prototypes ---------------------------------------------*/
void Error_Handler(void);

/* USER CODE BEGIN EFP */

/* USER CODE END EFP */

/* Private defines -----------------------------------------------------------*/
#define DW_WUP_Pin GPIO_PIN_13
#define DW_WUP_GPIO_Port GPIOC
#define BUTTON_Pin GPIO_PIN_0
#define BUTTON_GPIO_Port GPIOA
#define BUTTON_EXTI_IRQn EXTI0_IRQn
#define CAT1_RDY_Pin GPIO_PIN_1
#define CAT1_RDY_GPIO_Port GPIOA
#define CAT1_EN_Pin GPIO_PIN_4
#define CAT1_EN_GPIO_Port GPIOA
#define DW_RESET_Pin GPIO_PIN_5
#define DW_RESET_GPIO_Port GPIOA
#define VMON_Pin GPIO_PIN_6
#define VMON_GPIO_Port GPIOA
#define RESCUE_Pin GPIO_PIN_7
#define RESCUE_GPIO_Port GPIOA
#define GREEN_Pin GPIO_PIN_0
#define GREEN_GPIO_Port GPIOB
#define YELLOW_Pin GPIO_PIN_1
#define YELLOW_GPIO_Port GPIOB
#define RED_Pin GPIO_PIN_10
#define RED_GPIO_Port GPIOB
#define EN_5V_Pin GPIO_PIN_11
#define EN_5V_GPIO_Port GPIOB
#define DW_NSS_Pin GPIO_PIN_12
#define DW_NSS_GPIO_Port GPIOB
#define DW_SCK_Pin GPIO_PIN_13
#define DW_SCK_GPIO_Port GPIOB
#define DW_MISO_Pin GPIO_PIN_14
#define DW_MISO_GPIO_Port GPIOB
#define DW_MOSI_Pin GPIO_PIN_15
#define DW_MOSI_GPIO_Port GPIOB
#define DW_IRQn_Pin GPIO_PIN_8
#define DW_IRQn_GPIO_Port GPIOA
#define DW_IRQn_EXTI_IRQn EXTI9_5_IRQn
#define CAT1_RSP_Pin GPIO_PIN_6
#define CAT1_RSP_GPIO_Port GPIOB
#define SPL06_IRQ_Pin GPIO_PIN_7
#define SPL06_IRQ_GPIO_Port GPIOB
#define SPL06_IRQ_EXTI_IRQn EXTI9_5_IRQn
/* USER CODE BEGIN Private defines */

/* USER CODE END Private defines */

#ifdef __cplusplus
}
#endif

#endif /* __MAIN_H */

/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
